package com.ctcemti.mdm.project.sys.service;

import com.ctcemti.mdm.common.exception.InvalidParamException;
import com.ctcemti.mdm.project.sys.entity.SysMaterialClassification;
import com.ctcemti.mdm.project.sys.entity.formdata.BaseReq;
import com.github.pagehelper.PageInfo;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.sql.SQLException;
import java.util.List;
import java.util.Map;

/**
 * @ClassName SysMaterialClassificationMapper
 * @Description 物资分类表逻辑层接口层
 * @Author bxf
 * @Date 11:18 2019/7/12
 * @Version V1.0
 **/

public interface ISysMaterialClassificationService {
    /**
     * @Author bxf
     * @Description 根据主键删除
     * @Date 11:38 2019/7/12
     * @Param
     * @return
     **/
    int deleteByPrimaryKey(Integer id);
    /**
     * @Author bxf
     * @Description 插入物资分类表
     * @Date 11:39 2019/7/12
     * @Param
     * @return
     **/
    int insert(SysMaterialClassification record);

    /**
     * @Author bxf
     * @Description 选择性字段插入
     * @Date 11:39 2019/7/12
     * @Param
     * @return
     **/
    int insertSelective(SysMaterialClassification record);
    /**
     * @Author bxf
     * @Description 根据主键获取
     * @Date 11:40 2019/7/12
     * @Param
     * @return
     **/
    SysMaterialClassification selectByPrimaryKey(Integer id);
    /**
     * @Author bxf
     * @Description
     * @Date 11:41 2019/7/12
     * @Param 根据主键选择性字段更新对象
     * @return
     **/
    int updateByIdSelective(SysMaterialClassification SysMaterialClassification);
    /**
     * @Author bxf
     * @Description
     * @Date 11:47 2019/7/12
     * @Param 根据主键更新对象
     * @return
     **/
    int updateByPrimaryKey(SysMaterialClassification record);

    /**
     * @Author bxf
     * @Description 获取所有物资分类表子目
     * @Date 10:55 2019/7/15
     * @Param
     * @return
     **/
    public List<SysMaterialClassification> selectAllSysMaterialClassification();

    /**
     * @Author bxf
     * @Description 根据父id获取对象list
     * @Date 16:18 2019/7/12
     * @Param
     * @return
     **/
    public List<SysMaterialClassification> selectByPid(String s);

    /**
     * @Author bxf
     * @Description 根据实体中的属性值进行查询，查询条件使用等号
     * @Date 15:19 2019/7/16
     * @Param
     * @return
     **/
    public List<SysMaterialClassification> selectSysMaterialClassification(SysMaterialClassification SysMaterialClassification);

    /**
     * @Author bxf
     * @Description 根据主键删除
     * @Date 11:38 2019/7/12
     * @Param
     * @return
     **/
    int deleteByPrimaryKeys(String ids);
    /**
     * @Author bxf
     * @Description 根据id分页获取数据
     * @Date 8:04 2019/7/18
     * @Param
     * @return
     **/
    PageInfo<SysMaterialClassification> selectListByPid(String id, BaseReq baseReq);
    /* *
     * @Author bxf
     * @Description 根据分类名称获取树数据
     * @Date 14:54 2019/10/28
     * @param name
     * @return java.util.List<com.ctcemti.mdm.project.sys.entity.SysMaterialClassification>
     */
    List<SysMaterialClassification> selectSysMaterialClassificationByName(String name);

    @Transactional
    Map<String, Object> uploadFile(MultipartFile multipartFile, String category, HttpServletResponse response, HttpServletRequest request) throws SQLException, IOException, InvalidParamException;
}